// AVChatDlg.h : header file
//

#if !defined(AFX_AVCHATDLG_H__AE4CEB5D_68DE_410B_AC76_ABBD25AD59C9__INCLUDED_)
#define AFX_AVCHATDLG_H__AE4CEB5D_68DE_410B_AC76_ABBD25AD59C9__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

/////////////////////////////////////////////////////////////////////////////
// CAVChatDlg dialog
#include "GlobalDefs.h"
#include "CAVDevice.h"
#include "CVideoWindow.h"
#include "CMsgReceiver.h"

class CRoleAdmin;
class CAVChatDlg : public CDialog, public CMsgReceiver
{
// Construction
public:
	CAVChatDlg(CWnd* pParent = NULL);	// standard constructor

// Dialog Data
	//{{AFX_DATA(CAVChatDlg)
	enum { IDD = IDD_AVCHAT_DIALOG };
	CVideoWindow	mVideoWindow;
	CButton	mButtonDisconnect;
	CButton	mButtonCall;
	CString	mStatus;
	//}}AFX_DATA

	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CAVChatDlg)
	protected:
	virtual void DoDataExchange(CDataExchange* pDX);	// DDX/DDV support
	//}}AFX_VIRTUAL

// Implementation
protected:
	HICON m_hIcon;

	ROLE			mRole;
	CRoleAdmin *	mActor;

	enum{
		TIMER_INIT = 100,
		TIMER_REFRESH_LIST = 101,
	};

	UINT			mInitTimer;
	UINT			mRefreshListTimer;

	CAVDevice		mVideoDevice;
	CAVDevice		mAudioDevice;

	void Initialize(void);
	void ReflectStatus(void);

	virtual bool ReceiveMessage(MessageT inMessage, void * ioParam, 
		void * ioParam2);

	// Generated message map functions
	//{{AFX_MSG(CAVChatDlg)
	virtual BOOL OnInitDialog();
	afx_msg void OnPaint();
	afx_msg HCURSOR OnQueryDragIcon();
	afx_msg void OnButtonCall();
	afx_msg void OnDestroy();
	afx_msg void OnTimer(UINT nIDEvent);
	afx_msg void OnButtonDisconnect();
	afx_msg LRESULT OnModifyFilterGraph(WPARAM inWParam, LPARAM inLParam);
	afx_msg LRESULT OnRefreshAgent(WPARAM inWParam, LPARAM inLParam);
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()

private:
	ROLE GetRole() const;
	LONG GetDeviceConfig();

	VOID RefreshAgentList();

public:
	afx_msg void OnClose();
	afx_msg void OnLbnDblclkAgentList();
};

//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.

#endif // !defined(AFX_AVCHATDLG_H__AE4CEB5D_68DE_410B_AC76_ABBD25AD59C9__INCLUDED_)
